base_url = 'https://www.jci.edu.cn'

auto_run_seconds = 7200
auto_run_hours = 2

list_api_url = [
    {'url': base_url + '/index/xycx.htm', 'title': '校园采撷'},
    {'url': base_url + '/index/tzgg1.htm', 'title': '通知公告'},
    {'url': base_url + '/index/ybdt.htm', 'title': '院部动态'},
    {'url': base_url + '/index/ztxl.htm', 'title': '专题系列'},
    {'url': base_url + '/index/qcyl.htm', 'title': '青出于蓝'},
    {'url': base_url + '/index/fztl.htm', 'title': '纷至沓来'},
    {'url': base_url + '/index/wwby.htm', 'title': '无往不誉'},
    {'url': base_url + '/index/cfhy.htm', 'title': '春风化雨'},
    {'url': base_url + '/index/spxw.htm', 'title': '视频新闻'},
    {'url': base_url + '/index/mttd.htm', 'title': '媒体陶大'}
]
content_api_url = base_url + '/info/{news_col}/{news_id}.htm'


def get_content_api_url(news_col, news_id):
    return content_api_url.format(news_col=news_col, news_id=news_id)


def get_col_data():
    col_data = []
    for index, item in enumerate(list_api_url):
        col_data.append(
            {'cid': index, 'columnName': item['title'], 'columnUrl': item['url']}
        )
    return col_data
